package com.ss.android.article.base.feature.feed.vh;

import android.content.Context;
import android.content.res.Resources;
import android.text.SpannableString;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.bytedance.common.utility.UIUtils;
import com.ss.android.action.b.FeedViewHolder;
import com.ss.android.article.base.app.AppData;
import com.ss.android.article.base.feature.c.FeedItemBehavior;
import com.ss.android.article.base.feature.model.CellRef;
import com.ss.android.article.base.ui.j;
import com.ss.android.article.browser.R;

public final class FeedStickViewHolder extends FeedViewHolder {
    public Context o;
    public TextView mFeedStickContentTitle;
    public ImageView mFeedStickPopIcon;
    public View mItemView;
    FeedItemBehavior s;
    public int t;
    public CellRef u;
    public boolean v;
    public Resources w;
    public ImageView mFeedStickDivider;
    public final View.OnClickListener y;
    public View.OnClickListener z;

    public FeedStickViewHolder(Context context, FeedItemBehavior feedItemBehavior) {
        this.y = new View.OnClickListener() {
            public final void onClick(View arg4) {
                if (FeedStickViewHolder.this.s != null) {
                    FeedStickViewHolder.this.s.handlePopIconClick(FeedStickViewHolder.this.t, arg4, 0);
                }
            }
        };
        this.z = new View.OnClickListener() {
            public final void onClick(View arg4) {
                FeedStickViewHolder.this.s.handleItemClick(FeedStickViewHolder.this.t, arg4, new Object[0]);
            }
        };
        this.o = context;
        this.s = feedItemBehavior;
        this.w = this.o.getResources();
        AppData.getInstance();
        this.v = AppData.isNightMode();
    }

    public final SpannableString a(String arg6) {
        SpannableString v0;
        if (android.support.design.a.isTextEmpty(arg6)) {
            v0 = null;
            return v0;
        }

        v0 = new SpannableString("icon" + arg6);
        try {
            j v1 = new j(this.o, R.drawable.ve);
            v1.b = ((int) UIUtils.dp2px(this.o, 6f));
            v0.setSpan(v1, 0, 4, 33);
        } catch (Exception v0_1) {
            v0 = new SpannableString(((CharSequence) arg6));
        }

        return v0;
    }
}

